package com.hnkywl.sts.entity.cggl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.sys.Gg;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: ZHUCHG
 * Date: 13-4-15
 * Time: 下午4:49
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_BIZ_CGJSDMX")
@Where(clause = "deleted!='1'")
public class Cgjsdmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqCgjsdmx", allocationSize = 1, sequenceName = "SEQ_BIZ_CGJSDMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqCgjsdmx")
    private Long id;
    // 采购单明细
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "GG_ID")
    private Gg gg;
    // 图号
    private String th;
    // 产地
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SJZDZ_CD_ID")
    private Sjzdz cd;
    // 长/宽
    private String ck;

    // 含税价
    private Double hsj;
    // 不含税价
    private Double bhsj;
    //入库数量
    private Double rksl;
    // 净额
    private Double je;
    // 税额
    private Double se;
    // 差额
    private Double ce;
    //采购结算单
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CGJSD_ID")
    private Jsd jsd;

    //采购单明细ID
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CGDMX_ID")
    private Cgdmx cgdmx;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CGD_ID")
    private Cgd cgd;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Gg getGg() {
        return gg;
    }

    public void setGg(Gg gg) {
        this.gg = gg;
    }

    public String getTh() {
        return th;
    }

    public void setTh(String th) {
        this.th = th;
    }

    public Sjzdz getCd() {
        return cd;
    }

    public void setCd(Sjzdz cd) {
        this.cd = cd;
    }

    public String getCk() {
        return ck;
    }

    public void setCk(String ck) {
        this.ck = ck;
    }

    public Double getHsj() {
        return hsj;
    }

    public void setHsj(Double hsj) {
        this.hsj = hsj;
    }

    public Double getBhsj() {
        return bhsj;
    }

    public void setBhsj(Double bhsj) {
        this.bhsj = bhsj;
    }

    public Double getRksl() {
        return rksl;
    }

    public void setRksl(Double rksl) {
        this.rksl = rksl;
    }

    public Double getJe() {
        return je;
    }

    public void setJe(Double je) {
        this.je = je;
    }

    public Double getSe() {
        return se;
    }

    public void setSe(Double se) {
        this.se = se;
    }

    public Double getCe() {
        return ce;
    }

    public void setCe(Double ce) {
        this.ce = ce;
    }

    public Jsd getJsd() {
        return jsd;
    }

    public void setJsd(Jsd jsd) {
        this.jsd = jsd;
    }

    public Cgdmx getCgdmx() {
        return cgdmx;
    }

    public void setCgdmx(Cgdmx cgdmx) {
        this.cgdmx = cgdmx;
    }

    public Cgd getCgd() {
        return cgd;
    }

    public void setCgd(Cgd cgd) {
        this.cgd = cgd;
    }
}
